home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ntpdate.zip / NTPDATE.TXT < prev   
Text File  |  1995-01-30  |  3KB  |  75 lines

  1.  
  2. Information Update 950130
  3. =========================
  4.  
  5. The routines used to retrieve and set time were inconsistent
  6. with respect to timezone.  I have corrected it so that GMT
  7. is the basis for all time calculations.  This means that if
  8. you correctly set your timezone information using the 
  9. Control Panel applet, NTPDATE should now work properly for
  10. you.  This version has been tested in several different
  11. timezones with good success.
  12.  
  13. HOWEVER!  The C runtime library routines for getting
  14. the time also take cues from the 'TZ' environment variable,
  15. whereas the Win32 API for setting the system time does not.
  16. This means that if you set the 'TZ' environment variable,
  17. NTPDATE is not likely to set your time properly.  I will
  18. attempt to fix this next time I get some spare time.
  19.  
  20. I have removed the BEEP when NTPDATE sets the time.
  21.  
  22.  
  23. Base Information 941205
  24. =======================
  25.  
  26. NTPDATE.EXE is an NT (Intel) port of the ntpdate program which
  27. comes as part of the xntp distribution.  NTPDATE will query one
  28. or more NTP servers and set the local clock based on a statistical
  29. interpolation of the 'real' time.
  30.  
  31. It is a very preliminary hack, as I don't currently have the time 
  32. to follow through and clean it up (e.g. make it a service).  It 
  33. has been tested against NTP servers (v1 and v3) and correctly sets the 
  34. time.  The hacking was necessary primarily because of the timer/timing 
  35. services available in the Win32 subsystem.  Timezone information 
  36. was another problem, and I don't know what will happen when we get 
  37. to daylight savings time.  I expect to revisit the code before then 
  38. (as of this writing, I have about 5 months left!).
  39.  
  40. It is very simple to run.  The following command will set the time
  41. and report the time difference.
  42.  
  43.     NTPDATE <server1> [<server2> [<server3>...]]
  44.  
  45. Servers may be specified by name or address.
  46.  
  47. Putting '-v' on the command line will cause it to print the
  48. version information on the standard output.
  49.  
  50. Putting '-d' on the command line will cause it to print out
  51. lots of debugging information, and will also prevent it from
  52. setting the time.
  53.  
  54. You can tell ntpdate to communicate with older NTP protocols
  55. using the '-o' switch.  For instance, to query a version 1 server
  56. named abc, use the following command:  
  57.  
  58.     ntpdate -o 1 abc
  59.  
  60. I doubt any of the crypto functions work.
  61.  
  62. Other options may or may not work as a result of the hack.
  63.  
  64. Because I wasn't that familiar with the command-line options
  65. during the port, I modified the routine that actual changes
  66. the system time to print out the message 'Setting NT System Time!!!'
  67. with a beep, so there's no doubt.  If it doesn't beep, it didn't
  68. change the time.
  69.  
  70. Share and enjoy...
  71.  
  72. Todd Aven
  73. avents@btco.com
  74. 5 December 1994
  75.